package com.ky.circle.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ky.circle.entity.List;
import com.ky.circle.mapper.ListMapper;
import com.ky.common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 排行榜表 前端控制器
 * </p>
 *
 * @author lcr
 * @since 2024-06-24
 */
@RestController
@RequestMapping("/circle/list")
public class ListController {

    @Autowired
    private ListMapper listMapper;


    @RequestMapping("/selectAll")
    public R selectAll(){
        //查询所有的数据按照number倒序排列
        return R.ok(listMapper.selectList(new QueryWrapper<List>().orderByDesc("number")));



    }

}

